
#include <BPointConstraint>
#include "member_BPointConstraint.h"

using namespace BWE;

#define member						(*(member_BPointConstraint*)_ptr)
#define member_allocate()			_ptr = new member_BPointConstraint(this)
#define member_release()			delete (member_BPointConstraint*)_ptr

BPointConstraint::BPointConstraint()
{
	member_allocate();
}
BPointConstraint::BPointConstraint(BNode* nodeA, const BVector& pointA, const BVector& pointB) : BConstraint(nodeA, pointA, pointB)
{
	member_allocate();
}
BPointConstraint::BPointConstraint(BNode* nodeA, BNode* nodeB) : BConstraint(nodeA, nodeB)
{
	member_allocate();
}
BPointConstraint::BPointConstraint(BNode* nodeA, const BVector& pointA, BNode* nodeB, const BVector& pointB) : BConstraint(nodeA, pointA, nodeB, pointB)
{
	member_allocate();
}
BPointConstraint::~BPointConstraint()
{
	member_release();
}

void BPointConstraint::setFlags(Flags flags)
{
	member.flags = flags;
}
BPointConstraint::Flags BPointConstraint::flags() const
{
	return member.flags;
}

void BPointConstraint::setERP(BReal erp)
{
	member.erp = erp;
}
BReal BPointConstraint::erp() const
{
	return member.erp;
}

void BPointConstraint::setCFM(BReal cfm)
{
	member.cfm = cfm;
}
BReal BPointConstraint::cfm() const
{
	return member.cfm;
}

void BPointConstraint::setTAU(BReal tau)
{
	member.tau = tau;
	this->emit(Signal_Changed);
}
BReal BPointConstraint::tau() const
{
	return member.tau;
}

void BPointConstraint::setDamping(BReal damping)
{
	member.damping = damping;
	this->emit(Signal_Changed);
}
BReal BPointConstraint::damping() const
{
	return member.damping;
}

void BPointConstraint::setImpulseClamp(BReal impulseClamp)
{
	member.impulseClamp = impulseClamp;
	this->emit(Signal_Changed);
}
BReal BPointConstraint::impulseClamp() const
{
	return member.impulseClamp;
}

void BPointConstraint::solve()
{

}
